Expand description
A simple library to detect whether you are root/admin or not
Usage
use is_root::is_root;
if is_root() {
println!("Doing something dangerous")
} else {
eprintln!("Run me as root")
}
Functions
- Returns
true
if user is root;false
otherwise